
import {useState, useEffect} from 'react'
import PullRefreshList from '../pullRefreshList/index.jsx';
const FloorLIst = ({data}) => {
    const [floorDate, setFloorDate] = useState([])
    useEffect(() => {
        floorMothod()
    },[data])
    const floorMothod =() => {
        let list = data&&data.sort(() => Math.random() - 0.5)
        setFloorDate(list.slice(0,4))
    }
    return (
        <div>
            <PullRefreshList data={floorDate}/>
        </div>
    )
}

export default FloorLIst